//
// 嗨~ o(*￣▽￣*)ブ
// Created by Mokou on 2020/7/15.
//

#import <Flutter/Flutter.h>
#import "TZImagePickerController.h"

/**
 * 可选素材列表类型
 * */
typedef NS_ENUM(int, ImagePickerType) {
    ImagePickerType_photo = 1 << 0,
    ImagePickerType_video = 1 << 1,
};

/**
 * 媒体文件选择
 * */
@interface FileSelector : NSObject <UIImagePickerControllerDelegate, UINavigationControllerDelegate, TZImagePickerControllerDelegate>

/**
 * 初始化
 * */
+ (FileSelector *)shareInstance;

/**
 * 设置选择媒体文件的类型
 * */
- (void)setType:(int)type result:(FlutterResult)flutterResult;

/**
 * 拉起系统UI选择界面
 * */
- (void)select;

/**
 * 拉起多选界面
 */
- (void)selectMulti;

- (void)deleteFile:(NSString *)path;

- (NSUInteger)getFileLength:(NSString *)path;

/**
 * 每次app启动调用
 * 删除多余素材文件
 * */
- (void)deleteAllUnusedFile;

/**
 * 每次app启动调用
 * 删除缓存升级包文件
 * */
- (void)deleteAllUpgradeCache;

/**
 * 获取新的缓存文件路径
 * */
- (NSString *)getNewUpgradeFileCachePath;

- (NSDictionary *)moveUpgradeCacheToLocal:(NSString *)cachePath;

- (NSString *)checkUpgradeMd5Exist:(NSString *)md5;

@end
